<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexLinkTypeLinkIdInChatTable extends AbstractMigration
{

    public function up()
    {
        $this->table('chat')->addIndex(['link_type', 'link_id'], ['name' => 'idx_link_type_link_id', 'type' => 'normal'])->save();
    }

    public function down()
    {
        $this->table('chat')->removeIndexByName('idx_link_type_link_id')->save();
    }
}
